Hybris UX Api
TMF646 PATCH - Cancel Appointment
Cancel appointment in CSG.
URL
https://[localhost]:[port]/ecom-ux/v1/{businessId}/appointment/{id}url Param
| name | type | description | required |
|---|---|---|---|
| businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit. | Y |
| id | string | Appointment id | Y |
Header
| name | type | description | required |
|---|---|---|---|
| client_id | string | The client_id identifying the channel. Minimum characters: 5 | Y |
| client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y |
| X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
Request for Installation appointment:
curl --location --request PATCH 'https://nonprod.esb.cloud.lla.com/dev/ecom-ux/ecom-ux/v1/PR/appointment/1200096041981014' \
--header 'client_id: 12345' \
--header 'client_secret: abcde' \
--header 'X-Correlation-ID: 8417a2ba-19ae-4523-b63b-d99fcab9b5d5' \
--header 'Content-Type: application/json' \
--data-raw '{
"status": "cancelled",
"relatedEntity": [
{
"@type": "RelatedEntity",
"@referredType": "CancellationReason",
"id": "CR",
"name": "User canceled appointment",
"role": "cancellationReason"
},
{
"id": "8211990010043396",
"role": "Customer Account",
"@referredType": "BillingAccount",
"characteristics": [
{
"name": "type",
"value": "RES"
},
{
"name": "provisionableType",
"value": "P"
}
]
}
],
"validFor": {
"endDateTime": "2026-03-05T12:00:00.000-04:00"
},
"characteristics": [
{
"name": "orderClass",
"value": "S"
}
]
}'Request for Technical appointment:
curl --location --request PATCH 'https://nonprod.esb.cloud.lla.com/dev/ecom-ux/ecom-ux/v1/PR/appointment/1200096041981014' \
--header 'client_id: 12345' \
--header 'client_secret: abcde' \
--header 'X-Correlation-ID: 8417a2ba-19ae-4523-b63b-d99fcab9b5d5' \
--header 'Content-Type: application/json' \
--data-raw '{
"status": "cancelled",
"relatedEntity": [
{
"@type": "RelatedEntity",
"@referredType": "CancellationReason",
"id": "CR",
"name": "User canceled appointment",
"role": "cancellationReason"
}
],
"validFor": {
"endDateTime": "2026-03-05T12:00:00.000-04:00"
},
"characteristics": [
{
"name": "orderClass",
"value": "T"
}
]
}'Definitions
Each of the request parameters is detailed.
| name | Type | description | required |
|---|---|---|---|
| status | string | Appointment status | Y |
| relatedEntity | array | A reference to an entity | Y |
| relatedEntity.id | string | Cancellation reason. CA = Cancel by Customer or CR = Customer Requested. | Y |
| relatedEntity.name | string | Name of the related entity | N |
| relatedEntity.role | string | The role of an entity. It should be "cancellationReason" for this use case | Y |
| relatedEntity.@type | string | When sub-classing, this defines the sub-class entity name | N |
| relatedEntity.@referredType | string | The actual type of the target instance when needed for disambiguation. | Y |
| validFor | object | A period of time, either as a deadline | Y |
| validFor.endDateTime | string | End of the time period, using IETC-RFC-3339 format. Need to send current timestamp for this use case | Y |
Response
{
"id": "19981002",
"status": "cancelled"
}Definitions
Each of the response parameters is detailed.
| name | Type | description | required |
|---|---|---|---|
| id | string | Appointment id | N |
| status | string | Appointment status | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "The request is invalid or not properly formed.",
"description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
}]
}[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource."
}]
}[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The server could not find the requested resource.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method POST not allowed for : /{businessId}/appointment/{id}"
}]
}[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "Internal Server Error",
"description": "The request failed due to an internal error."
}]
}[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation GET /appointment/{id} for Business Id: xxxx not implemented"
}]
}